<%@ page contentType="text/html; charset=utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>修改新闻类型</title>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/script/lib/jquery-1.5.1.js"></script>
<script type="text/javascript">
$(function(){
	<% if(request.getAttribute("updateMsg") != null){
		%>var updateMsg = eval('('+'<%=request.getAttribute("updateMsg")%>'+')');
			alert(updateMsg.msg);
		 if(updateMsg.close=='true'){
			parent.ClosePop();
		} 
	<%}else{%>
	$.ajax({
        type: 'POST',
        url: 'getType?typeid='+$("#typeid").val(),
        dataType: 'json',
        success : function(data) {
		    var temp = eval('('+data+')');
		    $("#typename").val(temp.typename);
		    $("#typedescription").val(temp.typedescription);
		},
		error: function(data) { alert('获取新闻类型信息异常'); }
    });
<%}%>
	
});
function quitWin(){
	parent.ClosePop();
}
function submitForm(){
	//做表单的校验
}
</script>
</head>
<body>
	<div id="currentPossition" style="vertical-align: center">
		<table style="table-layout: fixed;" cellpadding="0" cellspacing="1" border="0">
		<tr><td><img width="7" height="7"  src="images/title/title-icon.gif" border="0" hspace="8" complete="complete"/></td>
		<td style="font-size: 9pt;">当前位置：新闻管理>新闻类型管理>修改新闻类型</td></tr></table>
	</div>
	<div align="left" style="border-color: #7f9db9;border-width: 1px;border-style: solid; margin-top: 6px;" >
		<div align="center" style="height:300px;width:100%;background-color:#f1f5ff;">
			<div align="left" style="height:25px;width:100%;background-color:#d5e2f2;font-size: 12px;vertical-align: ">
				<table style="vertical-align: middle;height: 100%;"><tr><td><img width="7" height="7"  src="images/title/title-icon.gif" border="0" hspace="8" complete="complete"/>修改新闻类型</td></tr></table>
			</div>
			<form action="updateType" onSubmit="return submitForm()">
				<table style="width: 100%;margin-top: 8px;">
					<tr >
						<td style="font-size: 12px;width:35%;" align="right"><font color="red"> 类型名称：</font></td>
						<td style="width:45%;" align="left"><input type="text" name="typename" id="typename" value="" style="width: 100%" />
						</td>
						<td style="width:20%;" align="left"><font color="red" > <div id="nameMsg" style="margin-left: 5px;font-size: 12px;">*</div></font></td>
					</tr>
					<tr>
						<td style="height:10px;font-size: 12px;width:15%;" align="right" colspan="4"></td>
					</tr>
					<tr>
						<td style="font-size: 12px;width:35%;" align="right"><font color="red">类型描述：</font></td>
						<td style="width:45%;" align="left">
						<textarea rows="5" name="typedescription" id="typedescription" value="" style="width: 100%"></textarea>
						</td>
						<td style="width:20%;" align="left"><font color="red"> <div id="typeMsg" style="margin-left: 5px;font-size: 12px;">*</div></font></td>
					</tr>
					<tr>
						<td style="height:10px;font-size: 12px;width:15%;" align="right" colspan="4"></td>
					</tr>
					<tr >
						<td></td>
						<td   style="height:22px;vertical-align: top;">
						<table style="width:100%"><tr><td style="width:20%" align="right">
						<input type="submit" value="保存" style="width: 60px; border-style: solid;border-width: 1px;border-color: #7f9db9;font-size: 9pt;background-color:#f1f5ff ;padding-top: 2px;" />
						</td><td align="right" style="width:20%">
						<input type="button" onclick="quitWin();" value="退出" style="width:60px; border-style: solid;border-width: 1px;border-color: #7f9db9;font-size: 9pt;background-color:#f1f5ff;padding-top: 2px; " />
						</td><td style="width:20%"></td>
						<td style="width:20%"><input type="hidden" id="typeid" name="typeid" value="<%=request.getAttribute("typeid") %>"/></td><td style="width:20%"></td></tr></table>
						</td>
					</tr>
				</table>
			</form>
		</div>
	</div>
</body>
</html>